package com.zrwl.poscloud.base.enums;

import com.zrwl.poscloud.base.entity.*;

public enum CompanyServerBusinessType {//代理商商户管理等数据采集
    //用于定义商户服务器业务数据类型
    //业务类型
    basicInformationUpload(1, "商户基本信息业务上传", Company.class),
    basicInformationDown(2, "商户基本信息业务下载", Company.class),
    companyAdminRInformationUpload(3, "商户管理员关联基本信息业务上传", CompanyAdminR.class),//上传后信息特殊处理
    companyAdminRInformationDown(4, "商户管理员关联基本信息业务下载", CompanyAdminR.class),
    adminInformationUpload(5, "管理员基本信息业务上传", Admin.class),
    adminInformationDown(6, "管理员基本信息业务下载", Admin.class),
    roleInformationUpload(7, "权限信息上传", Role.class),
    roleInformationDown(8, "权限信息下载", Role.class),
    adminRoleRInformationUpload(9, "管理员权限关联信息上传", AdminRole.class),
    adminRoleRInformationDown(10, "管理员权限关联信息下载", AdminRole.class),
//    businessUsingLogInfoDown(30, "商务订单使用信息记录下载", BusinessUsingLog.class),
    menuInformationUpload(31, "操作权限信息上传", Menus.class),//不用同步
    menuInformationDown(32, "操作权限信息下载", Menus.class),//不用同步
//    messageStationInfoUpload(35, "站内信上传", MessageStation.class),
//    messageStationInfoDown(36, "站内信下载", MessageStation.class),
//    tradeSettleInfoUpload(37, "交易结算上传", TradeSettle.class),
//    tradeSettleInfoDown(38, "交易结算下载", TradeSettle.class),
    companyDictDataUpload(39, "商户字典模板上传", CompanyDictData.class),
    companyDictDataDown(40, "商户字典模板下载", CompanyDictData.class),
//    merchantCompanyRUpload(41, "代理商商户绑定信息上传", MerchantCompany.class),
//    merchantCompanyRDown(42, "代理商商户绑定信息下载", MerchantCompany.class),
    companyFeeConfigUpload(43, "商户在线支付配置信息上传", CompanyPayConfig.class),
    companyFeeConfigDown(44, "商户在线支付配置信息下载", CompanyPayConfig.class);
    private final int serverBusinessType;
    private final String name;
    private final Class entity;

    CompanyServerBusinessType(int serverBusinessType, String name, Class entity) {
        this.serverBusinessType = serverBusinessType;
        this.name = name;
        this.entity = entity;
    }

    public int getServerBusinessType() {
        return serverBusinessType;
    }

    public String getName() {
        return name;
    }

    public Class getEntity() {
        return entity;
    }

    public static CompanyServerBusinessType getEumByCode(int Code) {
        for (CompanyServerBusinessType testEnums : CompanyServerBusinessType.values()) {
            if (testEnums.getServerBusinessType() == Code) {
                return testEnums;
            }
        }
        return null;
    }

}
